// 模拟后端动态生成路由
import { MockMethod } from "vite-plugin-mock";
import {
  contest,
  task,
  stuSystem,
  result,
  injurytime,
  answer,
  BigDataCaseEvaluation
} from "./models/router";
import { system, pythonData, bigDataCase } from "./models/admin";
/**
 * roles：页面级别权限，这里模拟二种 "admin"、"common"
 * Admin：管理员角色
 * common：普通角色
 */

export default [
  {
    url: "/getAsyncRoutes",
    method: "get",
    response: () => {
      return {
        success: true,
        data: [
          system,
          pythonData,
          contest,
          task,
          stuSystem,
          result,
          injurytime,
          answer,
          bigDataCase,
          BigDataCaseEvaluation
        ]
      };
    }
  }
] as MockMethod[];
